{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "name": "mlmd_tutorial.ipynb",
      "provenance": [],
      "collapsed_sections": [
        "Tce3stUlHN0L"
      ]
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "qFdPvlXBOdUN"
      },
      "source": [
        "# Better ML Engineering with ML Metadata\n",
        "\n",
        "\n",
        "\n",
        "## Learning Objectives\n",
        "\n",
        "1. Download the dataset\n",
        "2. Create an InteractiveContext\n",
        "3. Construct the TFX Pipeline\n",
        "4. Query the MLMD Database\n",
        "\n",
        "\n",
        "\n",
        "## Introduction \n",
        "\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "xHxb-dlhMIzW"
      },
      "source": [
        "Assume a scenario where you set up a production ML pipeline to classify penguins. The pipeline ingests your training data, trains and evaluates a model, and pushes it to production.\n",
        "\n",
        "However, when you later try using this model with a larger dataset that contains different kinds of penguins, you observe that your model does not behave as expected and starts classifying the species incorrectly.\n",
        "\n",
        "At this point, you are interested in knowing:\n",
        "\n",
        "* What is the most efficient way to debug the model when the only available artifact is the model in production?\n",
        "* Which training dataset was used to train the model?\n",
        "* Which training run led to this erroneous model?\n",
        "* Where are the model evaluation results?\n",
        "* Where to begin debugging?\n",
        "\n",
        "[ML Metadata (MLMD)](https://github.com/google/ml-metadata) is a library that leverages the metadata associated with ML models to help you answer these questions and more. A helpful analogy is to think of this metadata as the equivalent of logging in software development. MLMD enables you to reliably track the artifacts and lineage associated with the various components of your ML pipeline.\n",
        "\n",
        "In this notebook, you set up a TFX Pipeline to create a model that classifies penguins into three species based on the body mass and the length and depth of their culmens, and the length of their flippers. You then use MLMD to track the lineage of pipeline components.\n",
        "\n",
        "Each learning objective will correspond to a __#TODO__ in the [student lab notebook](https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/courses/machine_learning/deepdive2/production_ml/labs/mlmd_tutorial.ipynb) -- try to complete that notebook first before reviewing this solution notebook. \n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "MUXex9ctTuDB"
      },
      "source": [
        "## Setup\n",
        "\n",
        "First, we install and import the necessary packages, set up paths, and download data."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "lko0xn8JxI6F"
      },
      "source": [
        "### Upgrade Pip\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "7pXW--mlxQhY",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "47f1970f-5b96-4d0d-9a8f-b226010f8c84"
      },
      "source": [
        "!pip install --upgrade pip"
      ],
      "execution_count": 1,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Collecting pip\n",
            "\u001b[?25l  Downloading https://files.pythonhosted.org/packages/fe/ef/60d7ba03b5c442309ef42e7d69959f73aacccd0d86008362a681c4698e83/pip-21.2.1-py3-none-any.whl (1.5MB)\n",
            "\u001b[K     |████████████████████████████████| 1.5MB 7.5MB/s \n",
            "\u001b[?25hInstalling collected packages: pip\n",
            "  Found existing installation: pip 21.1.3\n",
            "    Uninstalling pip-21.1.3:\n",
            "      Successfully uninstalled pip-21.1.3\n",
            "Successfully installed pip-21.2.1\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "mQV-Cget1S8t"
      },
      "source": [
        "### Install and import TFX"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "82jOhrcA36YA",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "5d8ef195-f404-427b-a1bd-e5b8c92dccec"
      },
      "source": [
        "!pip install -q -U tfx"
      ],
      "execution_count": 2,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
            "multiprocess 0.70.11.1 requires dill>=0.3.3, but you have dill 0.3.1.1 which is incompatible.\n",
            "jupyter-console 5.2.0 requires prompt-toolkit<2.0.0,>=1.0.0, but you have prompt-toolkit 3.0.18 which is incompatible.\n",
            "datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible.\u001b[0m\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "OD2cRhwM3ez2"
      },
      "source": [
        "Please ignore the incompatibility error and warnings. Make sure to re-run the cell.\n"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "OD2cRhwM3ez2"
      },
      "source": [
        "You must restart the kernel after installing TFX. Select **Kernel > Restart kernel > Restart** from the menu.\n",
        "\n",
        "Do not proceed with the rest of this notebook without restarting the kernel."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "ohOztGn2wc1z"
      },
      "source": [
        "### Import other libraries"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "IqR2PQG4ZaZ0"
      },
      "source": [
        "import os\n",
        "import tempfile\n",
        "import urllib\n",
        "import pandas as pd\n",
        "\n",
        "import tensorflow_model_analysis as tfma\n",
        "from tfx.orchestration.experimental.interactive.interactive_context import InteractiveContext"
      ],
      "execution_count": 2,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "JKo31y2L5hCy"
      },
      "source": [
        "Import the MLMD library."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "FNYHX6zA5gE5"
      },
      "source": [
        "from tfx import v1 as tfx\n",
        "print('TFX version: {}'.format(tfx.__version__))\n",
        "import ml_metadata as mlmd\n",
        "print('MLMD version: {}'.format(mlmd.__version__))\n",
        "from ml_metadata.proto import metadata_store_pb2"
      ],
      "execution_count": 4,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "UhNtHfuxCGVy"
      },
      "source": [
        "## Download the dataset\n",
        "\n",
        "We use the [Palmer Penguins dataset](https://allisonhorst.github.io/palmerpenguins/articles/intro.html) which can be found on [Github](https://github.com/allisonhorst/palmerpenguins). We processed the dataset by leaving out any incomplete records, and drops `island` and `sex` columns, and converted labels to `int32`. The dataset contains 334 records of the body mass and the length and depth of penguins' culmens, and the length of their flippers. You use this data to classify penguins into one of three species."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "B_NibNnjzGHu",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "a2cd641a-97f3-4f96-8a99-bb51063a3fca"
      },
      "source": [
        "DATA_PATH = 'https://raw.githubusercontent.com/tensorflow/tfx/master/tfx/examples/penguin/data/labelled/penguins_processed.csv'\n",
        "_data_root = tempfile.mkdtemp(prefix='tfx-data')\n",
        "# TODO\n",
        "# Join various path components\n",
        "_data_filepath = os.path.join(_data_root, \"penguins_processed.csv\")\n",
        "urllib.request.urlretrieve(DATA_PATH, _data_filepath)"
      ],
      "execution_count": 5,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "('/tmp/tfx-datarn01z3vz/penguins_processed.csv',\n",
              " <http.client.HTTPMessage at 0x7f8cafe17b50>)"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 5
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "8NXg2bGA19HJ"
      },
      "source": [
        "## Create an InteractiveContext\n",
        "\n",
        "To run TFX components interactively in this notebook, create an `InteractiveContext`. The `InteractiveContext` uses a temporary directory with an ephemeral MLMD database instance.\n",
        "\n",
        "In general, it is a good practice to group similar pipeline runs under a `Context`."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "bytrDFKh40mi",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "affd9bd7-8c47-4eef-bf85-c0628efac593"
      },
      "source": [
        "# TODO\n",
        "interactive_context = InteractiveContext()"
      ],
      "execution_count": 6,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "WARNING:absl:InteractiveContext pipeline_root argument not provided: using temporary directory /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo as root for pipeline outputs.\n",
            "WARNING:absl:InteractiveContext metadata_connection_config not provided: using SQLite ML Metadata database at /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/metadata.sqlite.\n"
          ],
          "name": "stderr"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "e-58fa9S6Nao"
      },
      "source": [
        "## Construct the TFX Pipeline\n",
        "\n",
        "A TFX pipeline consists of several components that perform different aspects of the ML workflow. In this notebook, you create and run the `ExampleGen`, `StatisticsGen`, `SchemaGen`, and `Trainer` components and use the `Evaluator` and `Pusher` component to evaluate and push the trained model. \n",
        "\n",
        "Refer to the [components tutorial](https://www.tensorflow.org/tfx/tutorials/tfx/components_keras) for more information on TFX pipeline components."
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "urh3FTb81yyM"
      },
      "source": [
        "Note: Constructing a TFX Pipeline by setting up the individual components involves a lot of boilerplate code. For the purpose of this notebook, it is alright if you do not fully understand every line of code in the pipeline setup. "
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "bnnq7Gf8CHZJ"
      },
      "source": [
        "### Instantiate and run the ExampleGen Component"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "H9zaBZh3C_9x",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 277
        },
        "outputId": "74164cb5-8237-4c86-9722-36e21d42b750"
      },
      "source": [
        "# TODO\n",
        "example_gen = tfx.components.CsvExampleGen(input_base=_data_root)\n",
        "interactive_context.run(example_gen)"
      ],
      "execution_count": 7,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "WARNING:apache_beam.runners.interactive.interactive_environment:Dependencies required for Interactive Beam PCollection visualization are not available, please use: `pip install apache-beam[interactive]` to install necessary dependencies to enable all data visualization features.\n"
          ],
          "name": "stderr"
        },
        {
          "output_type": "display_data",
          "data": {
            "application/javascript": [
              "\n",
              "        if (typeof window.interactive_beam_jquery == 'undefined') {\n",
              "          var jqueryScript = document.createElement('script');\n",
              "          jqueryScript.src = 'https://code.jquery.com/jquery-3.4.1.slim.min.js';\n",
              "          jqueryScript.type = 'text/javascript';\n",
              "          jqueryScript.onload = function() {\n",
              "            var datatableScript = document.createElement('script');\n",
              "            datatableScript.src = 'https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js';\n",
              "            datatableScript.type = 'text/javascript';\n",
              "            datatableScript.onload = function() {\n",
              "              window.interactive_beam_jquery = jQuery.noConflict(true);\n",
              "              window.interactive_beam_jquery(document).ready(function($){\n",
              "                \n",
              "              });\n",
              "            }\n",
              "            document.head.appendChild(datatableScript);\n",
              "          };\n",
              "          document.head.appendChild(jqueryScript);\n",
              "        } else {\n",
              "          window.interactive_beam_jquery(document).ready(function($){\n",
              "            \n",
              "          });\n",
              "        }"
            ]
          },
          "metadata": {
            "tags": []
          }
        },
        {
          "output_type": "stream",
          "text": [
            "WARNING:apache_beam.io.tfrecordio:Couldn't find python-snappy so the implementation of _TFRecordUtil._masked_crc32c is not as fast as it could be.\n"
          ],
          "name": "stderr"
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object expanded\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">ExecutionResult</span><span class=\"deemphasize\"> at 0x7fba22aa7590</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.execution_id</td><td class = \"attrvalue\">1</td></tr><tr><td class=\"attr-name\">.component</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">CsvExampleGen</span><span class=\"deemphasize\"> at 0x7fba1ebca7d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.inputs</td><td class = \"attrvalue\">{}</td></tr><tr><td class=\"attr-name\">.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7fba1ebcabd0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2021-07-24T09_26_00.721922-9h873pwa/CsvExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7fba1ebc0310</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Examples&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-07-24T09_26_00.721922-9h873pwa/CsvExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[&quot;train&quot;, &quot;eval&quot;]</td></tr><tr><td class=\"attr-name\">.version</td><td class = \"attrvalue\">0</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.exec_properties</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['input_base']</td><td class = \"attrvalue\">/tmp/tfx-dataduqrz_en</td></tr><tr><td class=\"attr-name\">['input_config']</td><td class = \"attrvalue\">{\n",
              "  &quot;splits&quot;: [\n",
              "    {\n",
              "      &quot;name&quot;: &quot;single_split&quot;,\n",
              "      &quot;pattern&quot;: &quot;*&quot;\n",
              "    }\n",
              "  ]\n",
              "}</td></tr><tr><td class=\"attr-name\">['output_config']</td><td class = \"attrvalue\">{\n",
              "  &quot;split_config&quot;: {\n",
              "    &quot;splits&quot;: [\n",
              "      {\n",
              "        &quot;hash_buckets&quot;: 2,\n",
              "        &quot;name&quot;: &quot;train&quot;\n",
              "      },\n",
              "      {\n",
              "        &quot;hash_buckets&quot;: 1,\n",
              "        &quot;name&quot;: &quot;eval&quot;\n",
              "      }\n",
              "    ]\n",
              "  }\n",
              "}</td></tr><tr><td class=\"attr-name\">['output_data_format']</td><td class = \"attrvalue\">6</td></tr><tr><td class=\"attr-name\">['custom_config']</td><td class = \"attrvalue\">None</td></tr><tr><td class=\"attr-name\">['range_config']</td><td class = \"attrvalue\">None</td></tr><tr><td class=\"attr-name\">['span']</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">['version']</td><td class = \"attrvalue\">None</td></tr><tr><td class=\"attr-name\">['input_fingerprint']</td><td class = \"attrvalue\">split:single_split,num_files:1,total_bytes:25648,xor_checksum:1627118760,sum_checksum:1627118760</td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">.component.inputs</td><td class = \"attrvalue\">{}</td></tr><tr><td class=\"attr-name\">.component.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7fba1ebcabd0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2021-07-24T09_26_00.721922-9h873pwa/CsvExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7fba1ebc0310</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Examples&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-07-24T09_26_00.721922-9h873pwa/CsvExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[&quot;train&quot;, &quot;eval&quot;]</td></tr><tr><td class=\"attr-name\">.version</td><td class = \"attrvalue\">0</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr></table></div>"
             ],
            "text/plain": [
              "ExecutionResult(\n",
              "    component_id: CsvExampleGen\n",
              "    execution_id: 1\n",
              "    outputs:\n",
              "        examples: Channel(\n",
              "            type_name: Examples\n",
              "            artifacts: [Artifact(artifact: id: 1\n",
              "        type_id: 5\n",
              "        uri: \"/tmp/tfx-interactive-2021-07-24T09_26_00.721922-9h873pwa/CsvExampleGen/examples/1\"\n",
              "        properties {\n",
              "          key: \"split_names\"\n",
              "          value {\n",
              "            string_value: \"[\\\"train\\\", \\\"eval\\\"]\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"input_fingerprint\"\n",
              "          value {\n",
              "            string_value: \"split:single_split,num_files:1,total_bytes:25648,xor_checksum:1627118760,sum_checksum:1627118760\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"payload_format\"\n",
              "          value {\n",
              "            string_value: \"FORMAT_TF_EXAMPLE\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"span\"\n",
              "          value {\n",
              "            int_value: 0\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"state\"\n",
              "          value {\n",
              "            string_value: \"published\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"tfx_version\"\n",
              "          value {\n",
              "            string_value: \"1.0.0\"\n",
              "          }\n",
              "        }\n",
              "        state: LIVE\n",
              "        , artifact_type: id: 5\n",
              "        name: \"Examples\"\n",
              "        properties {\n",
              "          key: \"span\"\n",
              "          value: INT\n",
              "        }\n",
              "        properties {\n",
              "          key: \"split_names\"\n",
              "          value: STRING\n",
              "        }\n",
              "        properties {\n",
              "          key: \"version\"\n",
              "          value: INT\n",
              "        }\n",
              "        )]\n",
              "            additional_properties: {}\n",
              "            additional_custom_properties: {}\n",
              "        ))"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 7
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "nqxye_p1DLmf"
      },
      "source": [
        "### Instantiate and run the StatisticsGen Component"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "s67sHU_vDRds",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 163
        },
        "outputId": "076fb1dd-c618-4f62-c865-418eb2956ae3"
      },
      "source": [
        "# TODO\n",
        "statistics_gen = tfx.components.StatisticsGen(\n",
        "    examples=example_gen.outputs['examples'])\n",
        "interactive_context.run(statistics_gen)"
      ],
      "execution_count": 8,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object expanded\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">ExecutionResult</span><span class=\"deemphasize\"> at 0x7f8c5e8baad0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.execution_id</td><td class = \"attrvalue\">2</td></tr><tr><td class=\"attr-name\">.component</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">StatisticsGen</span><span class=\"deemphasize\"> at 0x7f8c5e8be150</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5ff00350</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/CsvExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7f8c625eea50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Examples&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/CsvExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[&quot;train&quot;, &quot;eval&quot;]</td></tr><tr><td class=\"attr-name\">.version</td><td class = \"attrvalue\">0</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['statistics']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5e8a8a10</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ExampleStatistics</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/StatisticsGen/statistics/2)<span class=\"deemphasize\"> at 0x7f8c5e8bac90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.ExampleStatistics&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/StatisticsGen/statistics/2</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[&quot;train&quot;, &quot;eval&quot;]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.exec_properties</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['stats_options_json']</td><td class = \"attrvalue\">None</td></tr><tr><td class=\"attr-name\">['exclude_splits']</td><td class = \"attrvalue\">[]</td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">.component.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5ff00350</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/CsvExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7f8c625eea50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Examples&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/CsvExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[&quot;train&quot;, &quot;eval&quot;]</td></tr><tr><td class=\"attr-name\">.version</td><td class = \"attrvalue\">0</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.component.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['statistics']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5e8a8a10</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ExampleStatistics</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/StatisticsGen/statistics/2)<span class=\"deemphasize\"> at 0x7f8c5e8bac90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.ExampleStatistics&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/StatisticsGen/statistics/2</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[&quot;train&quot;, &quot;eval&quot;]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr></table></div>"
            ],
            "text/plain": [
              "ExecutionResult(\n",
              "    component_id: StatisticsGen\n",
              "    execution_id: 2\n",
              "    outputs:\n",
              "        statistics: Channel(\n",
              "            type_name: ExampleStatistics\n",
              "            artifacts: [Artifact(artifact: id: 2\n",
              "        type_id: 7\n",
              "        uri: \"/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/StatisticsGen/statistics/2\"\n",
              "        properties {\n",
              "          key: \"split_names\"\n",
              "          value {\n",
              "            string_value: \"[\\\"train\\\", \\\"eval\\\"]\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"name\"\n",
              "          value {\n",
              "            string_value: \"statistics\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"producer_component\"\n",
              "          value {\n",
              "            string_value: \"StatisticsGen\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"state\"\n",
              "          value {\n",
              "            string_value: \"published\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"tfx_version\"\n",
              "          value {\n",
              "            string_value: \"1.0.0\"\n",
              "          }\n",
              "        }\n",
              "        state: LIVE\n",
              "        , artifact_type: id: 7\n",
              "        name: \"ExampleStatistics\"\n",
              "        properties {\n",
              "          key: \"span\"\n",
              "          value: INT\n",
              "        }\n",
              "        properties {\n",
              "          key: \"split_names\"\n",
              "          value: STRING\n",
              "        }\n",
              "        )]\n",
              "            additional_properties: {}\n",
              "            additional_custom_properties: {}\n",
              "        ))"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 8
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "xib9oRb_ExjJ"
      },
      "source": [
        "### Instantiate and run the SchemaGen Component"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "csmD4CSUE3JT",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 163
        },
        "outputId": "236dbf24-9db3-461b-97e5-fd3c256beab2"
      },
      "source": [
        "# TODO\n",
        "infer_schema = tfx.components.SchemaGen(\n",
        "    statistics=statistics_gen.outputs['statistics'], infer_feature_shape=True)\n",
        "interactive_context.run(infer_schema)"
      ],
      "execution_count": 9,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object expanded\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">ExecutionResult</span><span class=\"deemphasize\"> at 0x7f8c5da71110</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.execution_id</td><td class = \"attrvalue\">3</td></tr><tr><td class=\"attr-name\">.component</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">SchemaGen</span><span class=\"deemphasize\"> at 0x7f8c5d9c3910</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['statistics']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5e8a8a10</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ExampleStatistics</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/StatisticsGen/statistics/2)<span class=\"deemphasize\"> at 0x7f8c5e8bac90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.ExampleStatistics&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/StatisticsGen/statistics/2</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[&quot;train&quot;, &quot;eval&quot;]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['schema']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Schema'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5d9c3990</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Schema</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Schema'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/SchemaGen/schema/3)<span class=\"deemphasize\"> at 0x7f8c5d9c3850</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Schema&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/SchemaGen/schema/3</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.exec_properties</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['infer_feature_shape']</td><td class = \"attrvalue\">1</td></tr><tr><td class=\"attr-name\">['exclude_splits']</td><td class = \"attrvalue\">[]</td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">.component.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['statistics']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5e8a8a10</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ExampleStatistics</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ExampleStatistics'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/StatisticsGen/statistics/2)<span class=\"deemphasize\"> at 0x7f8c5e8bac90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.ExampleStatistics&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/StatisticsGen/statistics/2</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[&quot;train&quot;, &quot;eval&quot;]</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.component.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['schema']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Schema'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5d9c3990</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Schema</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Schema'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/SchemaGen/schema/3)<span class=\"deemphasize\"> at 0x7f8c5d9c3850</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Schema&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/SchemaGen/schema/3</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr></table></div>"
            ],
            "text/plain": [
              "ExecutionResult(\n",
              "    component_id: SchemaGen\n",
              "    execution_id: 3\n",
              "    outputs:\n",
              "        schema: Channel(\n",
              "            type_name: Schema\n",
              "            artifacts: [Artifact(artifact: id: 3\n",
              "        type_id: 9\n",
              "        uri: \"/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/SchemaGen/schema/3\"\n",
              "        custom_properties {\n",
              "          key: \"name\"\n",
              "          value {\n",
              "            string_value: \"schema\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"producer_component\"\n",
              "          value {\n",
              "            string_value: \"SchemaGen\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"state\"\n",
              "          value {\n",
              "            string_value: \"published\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"tfx_version\"\n",
              "          value {\n",
              "            string_value: \"1.0.0\"\n",
              "          }\n",
              "        }\n",
              "        state: LIVE\n",
              "        , artifact_type: id: 9\n",
              "        name: \"Schema\"\n",
              "        )]\n",
              "            additional_properties: {}\n",
              "            additional_custom_properties: {}\n",
              "        ))"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 9
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "_pYNlw7BHUjP"
      },
      "source": [
        "### Instantiate and run the Trainer Component\n",
        "\n"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "MTxf8xs_kKfG"
      },
      "source": [
        "# Define the module file for the Trainer component\n",
        "trainer_module_file = 'penguin_trainer.py'"
      ],
      "execution_count": 10,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "f3nLHEmUkRUw",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "72eb7d45-440e-429c-8802-5c52fd4ac7d6"
      },
      "source": [
       "%%writefile {trainer_module_file}\n",
       "\n",
       "# Define the training algorithm for the Trainer module file\n",
       "import os\n",
       "from typing import List, Text\n",
       "\n",
       "import tensorflow as tf\n",
       "from tensorflow import keras\n",
       "\n",
       "from tfx import v1 as tfx\n",
       "from tfx_bsl.public import tfxio\n",
       "\n",
       "from tensorflow_metadata.proto.v0 import schema_pb2\n",
       "\n",
       "# Features used for classification - culmen length and depth, flipper length,\n",
       "# body mass, and species.\n",
       "\n",
       "_LABEL_KEY = 'species'\n",
       "\n",
       "_FEATURE_KEYS = [\n",
       "    'culmen_length_mm', 'culmen_depth_mm', 'flipper_length_mm', 'body_mass_g'\n",
       "]\n",
       "\n",
       "\n",
       "def _input_fn(file_pattern: List[Text],\n",
       "              data_accessor: tfx.components.DataAccessor,\n",
       "              schema: schema_pb2.Schema, batch_size: int) -> tf.data.Dataset:\n",
       "  return data_accessor.tf_dataset_factory(\n",
       "      file_pattern,\n",
       "      tfxio.TensorFlowDatasetOptions(\n",
       "          batch_size=batch_size, label_key=_LABEL_KEY), schema).repeat()\n",
       "\n",
       "\n",
       "def _build_keras_model():\n",
       "  inputs = [keras.layers.Input(shape=(1,), name=f) for f in _FEATURE_KEYS]\n",
       "  d = keras.layers.concatenate(inputs)\n",
       "  d = keras.layers.Dense(8, activation='relu')(d)\n",
       "  d = keras.layers.Dense(8, activation='relu')(d)\n",
       "  outputs = keras.layers.Dense(3)(d)\n",
       "  model = keras.Model(inputs=inputs, outputs=outputs)\n",
       "  model.compile(\n",
       "      optimizer=keras.optimizers.Adam(1e-2),\n",
       "      loss=keras.losses.SparseCategoricalCrossentropy(from_logits=True),\n",
       "      metrics=[keras.metrics.SparseCategoricalAccuracy()])\n",
       "  return model\n",
       "\n",
       "\n",
       "def run_fn(fn_args: tfx.components.FnArgs):\n",
       "  schema = schema_pb2.Schema()\n",
       "  tfx.utils.parse_pbtxt_file(fn_args.schema_path, schema)\n",
       "  train_dataset = _input_fn(\n",
       "      fn_args.train_files, fn_args.data_accessor, schema, batch_size=10)\n",
       "  eval_dataset = _input_fn(\n",
       "      fn_args.eval_files, fn_args.data_accessor, schema, batch_size=10)\n",
       "  model = _build_keras_model()\n",
       "  model.fit(\n",
       "      train_dataset,\n",
       "      epochs=int(fn_args.train_steps / 20),\n",
       "      steps_per_epoch=20,\n",
       "      validation_data=eval_dataset,\n",
       "      validation_steps=fn_args.eval_steps)\n",
       "  model.save(fn_args.serving_model_dir, save_format='tf')"
      ],
      "execution_count": 11,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Writing penguin_trainer.py\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "qcmSNiqq5QaV"
      },
      "source": [
        "Run the `Trainer` component."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "4AzsMk7oflMg",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 455
        },
        "outputId": "6eed1366-b817-4308-8086-9ec2b5f6322e"
      },
      "source": [
       "trainer = tfx.components.Trainer(\n",
       "    module_file=os.path.abspath(trainer_module_file),\n",
       "    examples=example_gen.outputs['examples'],\n",
       "    schema=infer_schema.outputs['schema'],\n",
       "    train_args=tfx.proto.TrainArgs(num_steps=100),\n",
       "    eval_args=tfx.proto.EvalArgs(num_steps=50))\n",
       "interactive_context.run(trainer)"
      ],
      "execution_count": 12,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "WARNING:absl:From <ipython-input-12-d2af3312f9a2>:3: The name tfx.components.base.executor_spec.ExecutorClassSpec is deprecated. Please use tfx.dsl.components.base.executor_spec.ExecutorClassSpec instead.\n"
          ],
          "name": "stderr"
        },
        {
          "output_type": "stream",
          "text": [
            "running bdist_wheel\n",
            "running build\n",
            "running build_py\n",
            "creating build\n",
            "creating build/lib\n",
            "copying penguin_trainer.py -> build/lib\n",
            "installing to /tmp/tmpox9a4duz\n",
            "running install\n",
            "running install_lib\n",
            "copying build/lib/penguin_trainer.py -> /tmp/tmpox9a4duz\n",
            "running install_egg_info\n",
            "running egg_info\n",
            "creating tfx_user_code_Trainer.egg-info\n",
            "writing tfx_user_code_Trainer.egg-info/PKG-INFO\n",
            "writing dependency_links to tfx_user_code_Trainer.egg-info/dependency_links.txt\n",
            "writing top-level names to tfx_user_code_Trainer.egg-info/top_level.txt\n",
            "writing manifest file 'tfx_user_code_Trainer.egg-info/SOURCES.txt'\n",
            "reading manifest file 'tfx_user_code_Trainer.egg-info/SOURCES.txt'\n",
            "writing manifest file 'tfx_user_code_Trainer.egg-info/SOURCES.txt'\n",
            "Copying tfx_user_code_Trainer.egg-info to /tmp/tmpox9a4duz/tfx_user_code_Trainer-0.0+fef7c4ed90dc336ca26daee59d65660cf8da5fa988b2ca0c89df2f558fda10f4-py3.7.egg-info\n",
            "running install_scripts\n",
            "creating /tmp/tmpox9a4duz/tfx_user_code_Trainer-0.0+fef7c4ed90dc336ca26daee59d65660cf8da5fa988b2ca0c89df2f558fda10f4.dist-info/WHEEL\n",
            "creating '/tmp/tmpg1jzunkf/tfx_user_code_Trainer-0.0+fef7c4ed90dc336ca26daee59d65660cf8da5fa988b2ca0c89df2f558fda10f4-py3-none-any.whl' and adding '/tmp/tmpox9a4duz' to it\n",
            "adding 'penguin_trainer.py'\n",
            "adding 'tfx_user_code_Trainer-0.0+fef7c4ed90dc336ca26daee59d65660cf8da5fa988b2ca0c89df2f558fda10f4.dist-info/METADATA'\n",
            "adding 'tfx_user_code_Trainer-0.0+fef7c4ed90dc336ca26daee59d65660cf8da5fa988b2ca0c89df2f558fda10f4.dist-info/WHEEL'\n",
            "adding 'tfx_user_code_Trainer-0.0+fef7c4ed90dc336ca26daee59d65660cf8da5fa988b2ca0c89df2f558fda10f4.dist-info/top_level.txt'\n",
            "adding 'tfx_user_code_Trainer-0.0+fef7c4ed90dc336ca26daee59d65660cf8da5fa988b2ca0c89df2f558fda10f4.dist-info/RECORD'\n",
            "removing /tmp/tmpox9a4duz\n",
            "Processing /tmp/tfx-interactive-2021-07-24T09_26_00.721922-9h873pwa/_wheels/tfx_user_code_Trainer-0.0+fef7c4ed90dc336ca26daee59d65660cf8da5fa988b2ca0c89df2f558fda10f4-py3-none-any.whl\n",
            "Installing collected packages: tfx-user-code-Trainer\n",
            "Successfully installed tfx-user-code-Trainer-0.0+fef7c4ed90dc336ca26daee59d65660cf8da5fa988b2ca0c89df2f558fda10f4\n",
            "Epoch 1/5\n",
            "20/20 [==============================] - 2s 41ms/step - loss: 1.0736 - sparse_categorical_accuracy: 0.4434 - val_loss: 1.0587 - val_sparse_categorical_accuracy: 0.3300\n",
            "Epoch 2/5\n",
            "20/20 [==============================] - 0s 9ms/step - loss: 1.0446 - sparse_categorical_accuracy: 0.3951 - val_loss: 1.0321 - val_sparse_categorical_accuracy: 0.3800\n",
            "Epoch 3/5\n",
            "20/20 [==============================] - 0s 8ms/step - loss: 1.0075 - sparse_categorical_accuracy: 0.4740 - val_loss: 1.0068 - val_sparse_categorical_accuracy: 0.5600\n",
            "Epoch 4/5\n",
            "20/20 [==============================] - 0s 9ms/step - loss: 0.9766 - sparse_categorical_accuracy: 0.6205 - val_loss: 0.9821 - val_sparse_categorical_accuracy: 0.6400\n",
            "Epoch 5/5\n",
            "20/20 [==============================] - 0s 9ms/step - loss: 0.9722 - sparse_categorical_accuracy: 0.5671 - val_loss: 0.9564 - val_sparse_categorical_accuracy: 0.6700\n",
            "INFO:tensorflow:Assets written to: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4/Format-Serving/assets\n"

          ],
          "name": "stdout"
        },
        {
          "output_type": "stream",
          "text": [
            "INFO:tensorflow:Assets written to: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4/Format-Serving/assets\n"
          ],
          "name": "stderr"
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object expanded\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">ExecutionResult</span><span class=\"deemphasize\"> at 0x7f8c5da3c910</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.execution_id</td><td class = \"attrvalue\">4</td></tr><tr><td class=\"attr-name\">.component</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Trainer</span><span class=\"deemphasize\"> at 0x7f8c5d9c3150</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5ff00350</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/CsvExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7f8c625eea50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Examples&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/CsvExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[&quot;train&quot;, &quot;eval&quot;]</td></tr><tr><td class=\"attr-name\">.version</td><td class = \"attrvalue\">0</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['schema']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Schema'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5d9c3990</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Schema</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Schema'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/SchemaGen/schema/3)<span class=\"deemphasize\"> at 0x7f8c5d9c3850</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Schema&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/SchemaGen/schema/3</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['model']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Model'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5da25d50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Model</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Model'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4)<span class=\"deemphasize\"> at 0x7f8c5da3c650</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Model&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['model_run']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ModelRun'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5da254d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ModelRun</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ModelRun'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model_run/4)<span class=\"deemphasize\"> at 0x7f8c5da3c790</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.ModelRun&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model_run/4</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.exec_properties</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['train_args']</td><td class = \"attrvalue\">{\n",
              "  &quot;num_steps&quot;: 100\n",
              "}</td></tr><tr><td class=\"attr-name\">['eval_args']</td><td class = \"attrvalue\">{\n",
              "  &quot;num_steps&quot;: 50\n",
              "}</td></tr><tr><td class=\"attr-name\">['module_file']</td><td class = \"attrvalue\">/content/penguin_trainer.py</td></tr><tr><td class=\"attr-name\">['run_fn']</td><td class = \"attrvalue\">None</td></tr><tr><td class=\"attr-name\">['trainer_fn']</td><td class = \"attrvalue\">None</td></tr><tr><td class=\"attr-name\">['custom_config']</td><td class = \"attrvalue\">null</td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">.component.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5ff00350</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/CsvExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7f8c625eea50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Examples&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/CsvExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[&quot;train&quot;, &quot;eval&quot;]</td></tr><tr><td class=\"attr-name\">.version</td><td class = \"attrvalue\">0</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['schema']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Schema'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5d9c3990</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Schema</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Schema'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/SchemaGen/schema/3)<span class=\"deemphasize\"> at 0x7f8c5d9c3850</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Schema&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/SchemaGen/schema/3</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.component.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['model']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Model'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5da25d50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Model</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Model'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4)<span class=\"deemphasize\"> at 0x7f8c5da3c650</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Model&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['model_run']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ModelRun'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5da254d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ModelRun</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ModelRun'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model_run/4)<span class=\"deemphasize\"> at 0x7f8c5da3c790</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.ModelRun&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model_run/4</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr></table></div>"
            ],
            "text/plain": [
              "ExecutionResult(\n",
              "    component_id: Trainer\n",
              "    execution_id: 4\n",
              "    outputs:\n",
              "        model: Channel(\n",
              "            type_name: Model\n",
              "            artifacts: [Artifact(artifact: id: 4\n",
              "        type_id: 11\n",
              "        uri: \"/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4\"\n",
              "        custom_properties {\n",
              "          key: \"name\"\n",
              "          value {\n",
              "            string_value: \"model\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"producer_component\"\n",
              "          value {\n",
              "            string_value: \"Trainer\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"state\"\n",
              "          value {\n",
              "            string_value: \"published\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"tfx_version\"\n",
              "          value {\n",
              "            string_value: \"1.0.0\"\n",
              "          }\n",
              "        }\n",
              "        state: LIVE\n",
              "        , artifact_type: id: 11\n",
              "        name: \"Model\"\n",
              "        )]\n",
              "            additional_properties: {}\n",
              "            additional_custom_properties: {}\n",
              "        )\n",
              "        model_run: Channel(\n",
              "            type_name: ModelRun\n",
              "            artifacts: [Artifact(artifact: id: 5\n",
              "        type_id: 12\n",
              "        uri: \"/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model_run/4\"\n",
              "        custom_properties {\n",
              "          key: \"name\"\n",
              "          value {\n",
              "            string_value: \"model_run\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"producer_component\"\n",
              "          value {\n",
              "            string_value: \"Trainer\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"state\"\n",
              "          value {\n",
              "            string_value: \"published\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"tfx_version\"\n",
              "          value {\n",
              "            string_value: \"1.0.0\"\n",
              "          }\n",
              "        }\n",
              "        state: LIVE\n",
              "        , artifact_type: id: 12\n",
              "        name: \"ModelRun\"\n",
              "        )]\n",
              "            additional_properties: {}\n",
              "            additional_custom_properties: {}\n",
              "        ))"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 12
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "gdCq5c0f5MyA"
      },
      "source": [
        "### Evaluate and push the model\n",
        "\n",
        "Use the `Evaluator` component to evaluate and 'bless' the model before using the `Pusher` component to push the model to a serving directory."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "NDx-fTUb6RUU"
      },
      "source": [
        "_serving_model_dir = os.path.join(tempfile.mkdtemp(),\n",
        "                                  'serving_model/penguins_classification')"
      ],
      "execution_count": 13,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "PpS4-wCf6eLR"
      },
      "source": [
        "eval_config = tfma.EvalConfig(\n",
        "    model_specs=[\n",
        "        tfma.ModelSpec(label_key='species', signature_name='serving_default')\n",
        "    ],\n",
        "    metrics_specs=[\n",
        "        tfma.MetricsSpec(metrics=[\n",
        "            tfma.MetricConfig(\n",
        "                class_name='SparseCategoricalAccuracy',\n",
        "                threshold=tfma.MetricThreshold(\n",
        "                    value_threshold=tfma.GenericValueThreshold(\n",
        "                        lower_bound={'value': 0.6})))\n",
        "        ])\n",
        "    ],\n",
        "    slicing_specs=[tfma.SlicingSpec()])"
      ],
      "execution_count": 14,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "kFuH1YTh8vSf",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 387
        },
        "outputId": "cf8df990-bdad-4d96-b309-4823c9283175"
      },
      "source": [
       "evaluator = tfx.components.Evaluator(\n",
       "    examples=example_gen.outputs['examples'],\n",
       "    model=trainer.outputs['model'],\n",
       "    schema=infer_schema.outputs['schema'],\n",
       "    eval_config=eval_config)\n",
       "interactive_context.run(evaluator)"
      ],
      "execution_count": 15,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow_model_analysis/writers/metrics_plots_and_validations_writer.py:113: tf_record_iterator (from tensorflow.python.lib.io.tf_record) is deprecated and will be removed in a future version.\n",
            "Instructions for updating:\n",
            "Use eager execution and: \n",
            "`tf.data.TFRecordDataset(path)`\n"
          ],
          "name": "stdout"
        },
        {
          "output_type": "stream",
          "text": [
            "WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tensorflow_model_analysis/writers/metrics_plots_and_validations_writer.py:113: tf_record_iterator (from tensorflow.python.lib.io.tf_record) is deprecated and will be removed in a future version.\n",
            "Instructions for updating:\n",
            "Use eager execution and: \n",
            "`tf.data.TFRecordDataset(path)`\n"
          ],
          "name": "stderr"
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object expanded\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">ExecutionResult</span><span class=\"deemphasize\"> at 0x7f8c5da6efd0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.execution_id</td><td class = \"attrvalue\">5</td></tr><tr><td class=\"attr-name\">.component</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Evaluator</span><span class=\"deemphasize\"> at 0x7f8c5ffbd450</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5ff00350</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/CsvExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7f8c625eea50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Examples&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/CsvExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[&quot;train&quot;, &quot;eval&quot;]</td></tr><tr><td class=\"attr-name\">.version</td><td class = \"attrvalue\">0</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['model']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Model'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5da25d50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Model</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Model'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4)<span class=\"deemphasize\"> at 0x7f8c5da3c650</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Model&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['schema']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Schema'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5d9c3990</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Schema</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Schema'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/SchemaGen/schema/3)<span class=\"deemphasize\"> at 0x7f8c5d9c3850</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Schema&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/SchemaGen/schema/3</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['evaluation']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ModelEvaluation'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5ff14f90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ModelEvaluation</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ModelEvaluation'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/evaluation/5)<span class=\"deemphasize\"> at 0x7f8c5da60a90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.ModelEvaluation&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/evaluation/5</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['blessing']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ModelBlessing'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5ffbd5d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ModelBlessing</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ModelBlessing'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/blessing/5)<span class=\"deemphasize\"> at 0x7f8c5d9c3d50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.ModelBlessing&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/blessing/5</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.exec_properties</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['eval_config']</td><td class = \"attrvalue\">{\n",
              "  &quot;metrics_specs&quot;: [\n",
              "    {\n",
              "      &quot;metrics&quot;: [\n",
              "        {\n",
              "          &quot;class_name&quot;: &quot;SparseCategoricalAccuracy&quot;,\n",
              "          &quot;threshold&quot;: {\n",
              "            &quot;value_threshold&quot;: {\n",
              "              &quot;lower_bound&quot;: 0.6\n",
              "            }\n",
              "          }\n",
              "        }\n",
              "      ]\n",
              "    }\n",
              "  ],\n",
              "  &quot;model_specs&quot;: [\n",
              "    {\n",
              "      &quot;label_key&quot;: &quot;species&quot;,\n",
              "      &quot;signature_name&quot;: &quot;serving_default&quot;\n",
              "    }\n",
              "  ],\n",
              "  &quot;slicing_specs&quot;: [\n",
              "    {}\n",
              "  ]\n",
              "}</td></tr><tr><td class=\"attr-name\">['feature_slicing_spec']</td><td class = \"attrvalue\">None</td></tr><tr><td class=\"attr-name\">['fairness_indicator_thresholds']</td><td class = \"attrvalue\">None</td></tr><tr><td class=\"attr-name\">['example_splits']</td><td class = \"attrvalue\">null</td></tr><tr><td class=\"attr-name\">['module_file']</td><td class = \"attrvalue\">None</td></tr><tr><td class=\"attr-name\">['module_path']</td><td class = \"attrvalue\">None</td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">.component.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['examples']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Examples'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5ff00350</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Examples</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Examples'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/CsvExampleGen/examples/1)<span class=\"deemphasize\"> at 0x7f8c625eea50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Examples&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/CsvExampleGen/examples/1</td></tr><tr><td class=\"attr-name\">.span</td><td class = \"attrvalue\">0</td></tr><tr><td class=\"attr-name\">.split_names</td><td class = \"attrvalue\">[&quot;train&quot;, &quot;eval&quot;]</td></tr><tr><td class=\"attr-name\">.version</td><td class = \"attrvalue\">0</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['model']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Model'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5da25d50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Model</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Model'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4)<span class=\"deemphasize\"> at 0x7f8c5da3c650</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Model&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['schema']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Schema'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5d9c3990</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Schema</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Schema'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/SchemaGen/schema/3)<span class=\"deemphasize\"> at 0x7f8c5d9c3850</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Schema&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/SchemaGen/schema/3</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.component.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['evaluation']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ModelEvaluation'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5ff14f90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ModelEvaluation</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ModelEvaluation'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/evaluation/5)<span class=\"deemphasize\"> at 0x7f8c5da60a90</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.ModelEvaluation&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/evaluation/5</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['blessing']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ModelBlessing'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5ffbd5d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ModelBlessing</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ModelBlessing'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/blessing/5)<span class=\"deemphasize\"> at 0x7f8c5d9c3d50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.ModelBlessing&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/blessing/5</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr></table></div>"
            ],
            "text/plain": [
              "ExecutionResult(\n",
              "    component_id: Evaluator\n",
              "    execution_id: 5\n",
              "    outputs:\n",
              "        evaluation: Channel(\n",
              "            type_name: ModelEvaluation\n",
              "            artifacts: [Artifact(artifact: id: 6\n",
              "        type_id: 14\n",
              "        uri: \"/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/evaluation/5\"\n",
              "        custom_properties {\n",
              "          key: \"name\"\n",
              "          value {\n",
              "            string_value: \"evaluation\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"producer_component\"\n",
              "          value {\n",
              "            string_value: \"Evaluator\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"state\"\n",
              "          value {\n",
              "            string_value: \"published\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"tfx_version\"\n",
              "          value {\n",
              "            string_value: \"1.0.0\"\n",
              "          }\n",
              "        }\n",
              "        state: LIVE\n",
              "        , artifact_type: id: 14\n",
              "        name: \"ModelEvaluation\"\n",
              "        )]\n",
              "            additional_properties: {}\n",
              "            additional_custom_properties: {}\n",
              "        )\n",
              "        blessing: Channel(\n",
              "            type_name: ModelBlessing\n",
              "            artifacts: [Artifact(artifact: id: 7\n",
              "        type_id: 15\n",
              "        uri: \"/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/blessing/5\"\n",
              "        custom_properties {\n",
              "          key: \"blessed\"\n",
              "          value {\n",
              "            int_value: 1\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"current_model\"\n",
              "          value {\n",
              "            string_value: \"/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"current_model_id\"\n",
              "          value {\n",
              "            int_value: 4\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"name\"\n",
              "          value {\n",
              "            string_value: \"blessing\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"producer_component\"\n",
              "          value {\n",
              "            string_value: \"Evaluator\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"state\"\n",
              "          value {\n",
              "            string_value: \"published\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"tfx_version\"\n",
              "          value {\n",
              "            string_value: \"1.0.0\"\n",
              "          }\n",
              "        }\n",
              "        state: LIVE\n",
              "        , artifact_type: id: 15\n",
              "        name: \"ModelBlessing\"\n",
              "        )]\n",
              "            additional_properties: {}\n",
              "            additional_custom_properties: {}\n",
              "        ))"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 15
        }
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "NCV9gcCQ966W",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 184
        },
        "outputId": "1fceb932-4afe-4043-f69a-ad945843e765"
      },
      "source": [
        "pusher = tfx.components.Pusher(\n",
        "    model=trainer.outputs['model'],\n",
        "    model_blessing=evaluator.outputs['blessing'],\n",
        "    push_destination=tfx.proto.PushDestination(\n",
        "        filesystem=tfx.proto.PushDestination.Filesystem(\n",
        "            base_directory=_serving_model_dir)))\n",
        "interactive_context.run(pusher)"
      ],
      "execution_count": 16,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object expanded\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">ExecutionResult</span><span class=\"deemphasize\"> at 0x7f8c5d9fe310</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.execution_id</td><td class = \"attrvalue\">6</td></tr><tr><td class=\"attr-name\">.component</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Pusher</span><span class=\"deemphasize\"> at 0x7f8c57a42790</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['model']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Model'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5da25d50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Model</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Model'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4)<span class=\"deemphasize\"> at 0x7f8c5da3c650</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Model&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['model_blessing']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ModelBlessing'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5ffbd5d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ModelBlessing</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ModelBlessing'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/blessing/5)<span class=\"deemphasize\"> at 0x7f8c5d9c3d50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.ModelBlessing&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/blessing/5</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['pushed_model']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'PushedModel'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c57a42c50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">PushedModel</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'PushedModel'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Pusher/pushed_model/6)<span class=\"deemphasize\"> at 0x7f8c569e6190</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.PushedModel&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Pusher/pushed_model/6</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.exec_properties</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['push_destination']</td><td class = \"attrvalue\">{\n",
              "  &quot;filesystem&quot;: {\n",
              "    &quot;base_directory&quot;: &quot;/tmp/tmp1clqtrsl/serving_model/penguins_classification&quot;\n",
              "  }\n",
              "}</td></tr><tr><td class=\"attr-name\">['custom_config']</td><td class = \"attrvalue\">null</td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">.component.inputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['model']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'Model'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5da25d50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">Model</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'Model'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4)<span class=\"deemphasize\"> at 0x7f8c5da3c650</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.Model&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Trainer/model/4</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr><tr><td class=\"attr-name\">['model_blessing']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'ModelBlessing'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c5ffbd5d0</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">ModelBlessing</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'ModelBlessing'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/blessing/5)<span class=\"deemphasize\"> at 0x7f8c5d9c3d50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.ModelBlessing&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Evaluator/blessing/5</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr><tr><td class=\"attr-name\">.component.outputs</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">['pushed_model']</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Channel</span> of type <span class=\"class-name\">'PushedModel'</span> (1 artifact)<span class=\"deemphasize\"> at 0x7f8c57a42c50</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type_name</td><td class = \"attrvalue\">PushedModel</td></tr><tr><td class=\"attr-name\">._artifacts</td><td class = \"attrvalue\"><table class=\"attr-table\"><tr><td class=\"attr-name\">[0]</td><td class = \"attrvalue\"><style>\n",
              ".tfx-object.expanded {\n",
              "  padding: 4px 8px 4px 8px;\n",
              "  background: white;\n",
              "  border: 1px solid #bbbbbb;\n",
              "  box-shadow: 4px 4px 2px rgba(0,0,0,0.05);\n",
              "}\n",
              ".tfx-object, .tfx-object * {\n",
              "  font-size: 11pt;\n",
              "}\n",
              ".tfx-object > .title {\n",
              "  cursor: pointer;\n",
              "}\n",
              ".tfx-object .expansion-marker {\n",
              "  color: #999999;\n",
              "}\n",
              ".tfx-object.expanded > .title > .expansion-marker:before {\n",
              "  content: '▼';\n",
              "}\n",
              ".tfx-object.collapsed > .title > .expansion-marker:before {\n",
              "  content: '▶';\n",
              "}\n",
              ".tfx-object .class-name {\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object .deemphasize {\n",
              "  opacity: 0.5;\n",
              "}\n",
              ".tfx-object.collapsed > table.attr-table {\n",
              "  display: none;\n",
              "}\n",
              ".tfx-object.expanded > table.attr-table {\n",
              "  display: block;\n",
              "}\n",
              ".tfx-object table.attr-table {\n",
              "  border: 2px solid white;\n",
              "  margin-top: 5px;\n",
              "}\n",
              ".tfx-object table.attr-table td.attr-name {\n",
              "  vertical-align: top;\n",
              "  font-weight: bold;\n",
              "}\n",
              ".tfx-object table.attr-table td.attrvalue {\n",
              "  text-align: left;\n",
              "}\n",
              "</style>\n",
              "<script>\n",
              "function toggleTfxObject(element) {\n",
              "  var objElement = element.parentElement;\n",
              "  if (objElement.classList.contains('collapsed')) {\n",
              "    objElement.classList.remove('collapsed');\n",
              "    objElement.classList.add('expanded');\n",
              "  } else {\n",
              "    objElement.classList.add('collapsed');\n",
              "    objElement.classList.remove('expanded');\n",
              "  }\n",
              "}\n",
              "</script>\n",
              "<div class=\"tfx-object collapsed\"><div class = \"title\" onclick=\"toggleTfxObject(this)\"><span class=\"expansion-marker\"></span><span class=\"class-name\">Artifact</span> of type <span class=\"class-name\">'PushedModel'</span> (uri: /tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Pusher/pushed_model/6)<span class=\"deemphasize\"> at 0x7f8c569e6190</span></div><table class=\"attr-table\"><tr><td class=\"attr-name\">.type</td><td class = \"attrvalue\">&lt;class &#x27;tfx.types.standard_artifacts.PushedModel&#x27;&gt;</td></tr><tr><td class=\"attr-name\">.uri</td><td class = \"attrvalue\">/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Pusher/pushed_model/6</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table></td></tr></table></div>"
            ],
            "text/plain": [
              "ExecutionResult(\n",
              "    component_id: Pusher\n",
              "    execution_id: 6\n",
              "    outputs:\n",
              "        pushed_model: Channel(\n",
              "            type_name: PushedModel\n",
              "            artifacts: [Artifact(artifact: id: 8\n",
              "        type_id: 17\n",
              "        uri: \"/tmp/tfx-interactive-2021-04-19T10_22_06.380156-emsem0yo/Pusher/pushed_model/6\"\n",
              "        custom_properties {\n",
              "          key: \"name\"\n",
              "          value {\n",
              "            string_value: \"pushed_model\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"producer_component\"\n",
              "          value {\n",
              "            string_value: \"Pusher\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"pushed\"\n",
              "          value {\n",
              "            int_value: 1\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"pushed_destination\"\n",
              "          value {\n",
              "            string_value: \"/tmp/tmp1clqtrsl/serving_model/penguins_classification/1618827742\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"pushed_version\"\n",
              "          value {\n",
              "            string_value: \"1618827742\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"state\"\n",
              "          value {\n",
              "            string_value: \"published\"\n",
              "          }\n",
              "        }\n",
              "        custom_properties {\n",
              "          key: \"tfx_version\"\n",
              "          value {\n",
              "            string_value: \"1.0.0\"\n",
              "          }\n",
              "        }\n",
              "        state: LIVE\n",
              "        , artifact_type: id: 17\n",
              "        name: \"PushedModel\"\n",
              "        )]\n",
              "            additional_properties: {}\n",
              "            additional_custom_properties: {}\n",
              "        ))"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 16
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "9K7RzdBzkru7"
      },
      "source": [
        "Running the TFX pipeline populates the MLMD Database. In the next section, you use the MLMD API to query this database for metadata information. "
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "6GRCGQu7RguC"
      },
      "source": [
        "## Query the MLMD Database\n",
        "\n",
        "The MLMD database stores three types of metadata: \n",
        "\n",
        "*    Metadata about the pipeline and lineage information associated with the pipeline components\n",
        "*    Metadata about artifacts that were generated during the pipeline run\n",
        "*    Metadata about the executions of the pipeline\n",
        "\n",
        "A typical production environment pipeline serves multiple models as new data arrives. When you encounter erroneous results in served models, you can query the MLMD database to isolate the erroneous models. You can then trace the lineage of the pipeline components that correspond to these models to debug your models"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "o0xVYqAkJybK"
      },
      "source": [
        "Set up the metadata (MD) store with the `InteractiveContext` defined previously to query the MLMD database."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "P1p38etAv0kC"
      },
      "source": [
        "connection_config = interactive_context.metadata_connection_config\n",
        "store = mlmd.MetadataStore(connection_config)\n",
        "\n",
        "# All TFX artifacts are stored in the base directory\n",
        "base_dir = connection_config.sqlite.filename_uri.split('metadata.sqlite')[0]"
      ],
      "execution_count": 17,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "uq-1ep4suvuZ"
      },
      "source": [
        "Create some helper functions to view the data from the MD store."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "q1ib8yStu6CW"
      },
      "source": [
        "def display_types(types):\n",
        "  # Helper function to render dataframes for the artifact and execution types\n",
        "  table = {'id': [], 'name': []}\n",
        "  for a_type in types:\n",
        "    table['id'].append(a_type.id)\n",
        "    table['name'].append(a_type.name)\n",
        "  return pd.DataFrame(data=table)"
      ],
      "execution_count": 18,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "HmqzYZcV3UG5"
      },
      "source": [
        "def display_artifacts(store, artifacts):\n",
        "  # Helper function to render dataframes for the input artifacts\n",
        "  table = {'artifact id': [], 'type': [], 'uri': []}\n",
        "  for a in artifacts:\n",
        "    table['artifact id'].append(a.id)\n",
        "    artifact_type = store.get_artifact_types_by_id([a.type_id])[0]\n",
        "    table['type'].append(artifact_type.name)\n",
        "    table['uri'].append(a.uri.replace(base_dir, './'))\n",
        "  return pd.DataFrame(data=table)"
      ],
      "execution_count": 19,
      "outputs": []
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "iBdGCZ0CMJDO"
      },
      "source": [
        "def display_properties(store, node):\n",
        "  # Helper function to render dataframes for artifact and execution properties\n",
        "  table = {'property': [], 'value': []}\n",
        "  for k, v in node.properties.items():\n",
        "    table['property'].append(k)\n",
        "    table['value'].append(\n",
        "        v.string_value if v.HasField('string_value') else v.int_value)\n",
        "  for k, v in node.custom_properties.items():\n",
        "    table['property'].append(k)\n",
        "    table['value'].append(\n",
        "        v.string_value if v.HasField('string_value') else v.int_value)\n",
        "  return pd.DataFrame(data=table)"
      ],
      "execution_count": 20,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "1B-jRNH0M0k4"
      },
      "source": [
        "First, query the MD store for a list of all its stored `ArtifactTypes`."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "6zXSQL8s5dyL",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 293
        },
        "outputId": "4c56ab03-202c-4715-e2cf-22415f1eb0d8"
      },
      "source": [
        "display_types(store.get_artifact_types())"
      ],
      "execution_count": 21,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>id</th>\n",
              "      <th>name</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>5</td>\n",
              "      <td>Examples</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>7</td>\n",
              "      <td>ExampleStatistics</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>9</td>\n",
              "      <td>Schema</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>11</td>\n",
              "      <td>Model</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>12</td>\n",
              "      <td>ModelRun</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>14</td>\n",
              "      <td>ModelEvaluation</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>15</td>\n",
              "      <td>ModelBlessing</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>17</td>\n",
              "      <td>PushedModel</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   id               name\n",
              "0   5           Examples\n",
              "1   7  ExampleStatistics\n",
              "2   9             Schema\n",
              "3  11              Model\n",
              "4  12           ModelRun\n",
              "5  14    ModelEvaluation\n",
              "6  15      ModelBlessing\n",
              "7  17        PushedModel"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 21
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "quOsBgtM3r7S"
      },
      "source": [
        "Next, query all `PushedModel` artifacts."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "bUv_EI-bEMMu",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 79
        },
        "outputId": "5dbd2e6e-8ac2-4cb4-94fe-732a8d81f32d"
      },
      "source": [
        "pushed_models = store.get_artifacts_by_type(\"PushedModel\")\n",
        "display_artifacts(store, pushed_models)"
      ],
      "execution_count": 22,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>artifact id</th>\n",
              "      <th>type</th>\n",
              "      <th>uri</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>8</td>\n",
              "      <td>PushedModel</td>\n",
              "      <td>./Pusher/pushed_model/6</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   artifact id         type                      uri\n",
              "0            8  PushedModel  ./Pusher/pushed_model/6"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 22
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "UecjkVOqJCBE"
      },
      "source": [
        "Query the MD store for the latest pushed model. This notebook has only one pushed model. "
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "N8tPvRtcPTrU",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 262
        },
        "outputId": "b8307a7e-ef5a-4e70-9302-2445dcfeda43"
      },
      "source": [
        "pushed_model = pushed_models[-1]\n",
        "display_properties(store, pushed_model)"
      ],
      "execution_count": 23,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>property</th>\n",
              "      <th>value</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>state</td>\n",
              "      <td>published</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>producer_component</td>\n",
              "      <td>Pusher</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>pushed_destination</td>\n",
              "      <td>/tmp/tmp1clqtrsl/serving_model/penguins_classi...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>tfx_version</td>\n",
              "      <td>1.0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>pushed</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>name</td>\n",
              "      <td>pushed_model</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>pushed_version</td>\n",
              "      <td>1618827742</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "             property                                              value\n",
              "0               state                                          published\n",
              "1  producer_component                                             Pusher\n",
              "2  pushed_destination  /tmp/tmp1clqtrsl/serving_model/penguins_classi...\n",
              "3         tfx_version                                             1.0.0\n",
              "4              pushed                                                  1\n",
              "5                name                                       pushed_model\n",
              "6      pushed_version                                         1618827742"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 23
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "f5Mz4vfP6wHO"
      },
      "source": [
        "One of the first steps in debugging a pushed model is to look at which trained model is pushed and to see which training data is used to train that model.  \n",
        "\n",
        "MLMD provides traversal APIs to walk through the provenance graph, which you can use to analyze the model provenance. "
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "BLfydQVxOwf3"
      },
      "source": [
        "def get_one_hop_parent_artifacts(store, artifacts):\n",
        "  # Get a list of artifacts within a 1-hop of the artifacts of interest\n",
        "  artifact_ids = [artifact.id for artifact in artifacts]\n",
        "  executions_ids = set(\n",
        "      event.execution_id\n",
        "      for event in store.get_events_by_artifact_ids(artifact_ids)\n",
        "      if event.type == mlmd.proto.Event.OUTPUT)\n",
        "  artifacts_ids = set(\n",
        "      event.artifact_id\n",
        "      for event in store.get_events_by_execution_ids(executions_ids)\n",
        "      if event.type == mlmd.proto.Event.INPUT)\n",
        "  return [artifact for artifact in store.get_artifacts_by_id(artifacts_ids)]"
      ],
      "execution_count": 24,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "3G0e0WIE9e9w"
      },
      "source": [
        "Query the parent artifacts for the pushed model."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "pOEFxucJQ1i6",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 109
        },
        "outputId": "6f216390-a461-4f83-9039-662ec30afe0a"
      },
      "source": [
        "# TODO\n",
        "parent_artifacts = get_one_hop_parent_artifacts(store, [pushed_model])\n",
        "display_artifacts(store, parent_artifacts)"
      ],
      "execution_count": 25,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>artifact id</th>\n",
              "      <th>type</th>\n",
              "      <th>uri</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>4</td>\n",
              "      <td>Model</td>\n",
              "      <td>./Trainer/model/4</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>7</td>\n",
              "      <td>ModelBlessing</td>\n",
              "      <td>./Evaluator/blessing/5</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   artifact id           type                     uri\n",
              "0            4          Model       ./Trainer/model/4\n",
              "1            7  ModelBlessing  ./Evaluator/blessing/5"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 25
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "pJror5mf-W0M"
      },
      "source": [
        "Query the properties for the model."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "OSCb0bg6Qmj4",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 170
        },
        "outputId": "6e5834ba-55a3-45c0-b9fa-1fbca9ba3c25"
      },
      "source": [
        "exported_model = parent_artifacts[0]\n",
        "display_properties(store, exported_model)"
      ],
      "execution_count": 26,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>property</th>\n",
              "      <th>value</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>state</td>\n",
              "      <td>published</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>producer_component</td>\n",
              "      <td>Trainer</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>name</td>\n",
              "      <td>model</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>tfx_version</td>\n",
              "      <td>1.0.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "             property      value\n",
              "0               state  published\n",
              "1  producer_component    Trainer\n",
              "2                name      model\n",
              "3         tfx_version     1.0.0"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 26
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "phz1hfzc_UcK"
      },
      "source": [
        "Query the upstream artifacts for the model."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "nx_-IVhjRGA4",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 109
        },
        "outputId": "e10a303d-b16a-47eb-d529-da3c4ae11f97"
      },
      "source": [
        "model_parents = get_one_hop_parent_artifacts(store, [exported_model])\n",
        "display_artifacts(store, model_parents)"
      ],
      "execution_count": 27,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>artifact id</th>\n",
              "      <th>type</th>\n",
              "      <th>uri</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>1</td>\n",
              "      <td>Examples</td>\n",
              "      <td>./CsvExampleGen/examples/1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>3</td>\n",
              "      <td>Schema</td>\n",
              "      <td>./SchemaGen/schema/3</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   artifact id      type                         uri\n",
              "0            1  Examples  ./CsvExampleGen/examples/1\n",
              "1            3    Schema        ./SchemaGen/schema/3"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 27
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "00jqfk6o_niu"
      },
      "source": [
        "Get the training data the model trained with."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "2nMECsKvROEX",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 231
        },
        "outputId": "3a92ab1b-8411-45ca-ab57-f57ab65d83e6"
      },
      "source": [
        "used_data = model_parents[0]\n",
        "display_properties(store, used_data)"
      ],
      "execution_count": 28,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>property</th>\n",
              "      <th>value</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>split_names</td>\n",
              "      <td>[\"train\", \"eval\"]</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>payload_format</td>\n",
              "      <td>FORMAT_TF_EXAMPLE</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>tfx_version</td>\n",
              "      <td>1.0.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>input_fingerprint</td>\n",
              "      <td>split:single_split,num_files:1,total_bytes:256...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>state</td>\n",
              "      <td>published</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>span</td>\n",
              "      <td>0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "            property                                              value\n",
              "0        split_names                                  [\"train\", \"eval\"]\n",
              "1     payload_format                                  FORMAT_TF_EXAMPLE\n",
              "2        tfx_version                                             1.0.0\n",
              "3  input_fingerprint  split:single_split,num_files:1,total_bytes:256...\n",
              "4              state                                          published\n",
              "5               span                                                  0"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 28
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "GgTMTaew_3Fe"
      },
      "source": [
        "Now that you have the training data that the model trained with, query the database again to find the training step (execution). Query the MD store for a list of the registered execution types."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "8cBKQsScaD9a",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 231
        },
        "outputId": "48bc447d-2064-45a5-e545-713db13e5684"
      },
      "source": [
        "display_types(store.get_execution_types())"
      ],
      "execution_count": 29,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>id</th>\n",
              "      <th>name</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>3</td>\n",
              "      <td>tfx.components.example_gen.csv_example_gen.com...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>6</td>\n",
              "      <td>tfx.components.statistics_gen.component.Statis...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>8</td>\n",
              "      <td>tfx.components.schema_gen.component.SchemaGen</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>10</td>\n",
              "      <td>tfx.components.trainer.component.Trainer</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>13</td>\n",
              "      <td>tfx.components.evaluator.component.Evaluator</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>16</td>\n",
              "      <td>tfx.components.pusher.component.Pusher</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "   id                                               name\n",
              "0   3  tfx.components.example_gen.csv_example_gen.com...\n",
              "1   6  tfx.components.statistics_gen.component.Statis...\n",
              "2   8      tfx.components.schema_gen.component.SchemaGen\n",
              "3  10           tfx.components.trainer.component.Trainer\n",
              "4  13       tfx.components.evaluator.component.Evaluator\n",
              "5  16             tfx.components.pusher.component.Pusher"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 29
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "wxcue6SggQ_b"
      },
      "source": [
        "The training step is the `ExecutionType` named `tfx.components.trainer.component.Trainer`. Traverse the MD store to get the trainer run that corresponds to the pushed model."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Ned8BxHzaunk",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 415
        },
        "outputId": "47c4bed2-bd6d-4c7f-eee2-f88a921433da"
      },
      "source": [
        "def find_producer_execution(store, artifact):\n",
        "  executions_ids = set(\n",
        "      event.execution_id\n",
        "      for event in store.get_events_by_artifact_ids([artifact.id])\n",
        "      if event.type == mlmd.proto.Event.OUTPUT)\n",
        "  return store.get_executions_by_id(executions_ids)[0]\n",
        "\n",
        "# TODO\n",
        "trainer = find_producer_execution(store, exported_model)\n",
        "display_properties(store, trainer)"
      ],
      "execution_count": 30,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/html": [
              "<div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>property</th>\n",
              "      <th>value</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>component_id</td>\n",
              "      <td>Trainer</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>pipeline_root</td>\n",
              "      <td>/tmp/tfx-interactive-2021-04-19T10_22_06.38015...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>module_file</td>\n",
              "      <td>/content/penguin_trainer.py</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>checksum_md5</td>\n",
              "      <td>bfcbe87349c87f86751e959786dde8f4</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>train_args</td>\n",
              "      <td>{\\n  \"num_steps\": 100\\n}</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>5</th>\n",
              "      <td>custom_config</td>\n",
              "      <td>null</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>6</th>\n",
              "      <td>run_fn</td>\n",
              "      <td>None</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>7</th>\n",
              "      <td>state</td>\n",
              "      <td>complete</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>8</th>\n",
              "      <td>pipeline_name</td>\n",
              "      <td>interactive-2021-04-19T10_22_06.380156</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>9</th>\n",
              "      <td>trainer_fn</td>\n",
              "      <td>None</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>10</th>\n",
              "      <td>eval_args</td>\n",
              "      <td>{\\n  \"num_steps\": 50\\n}</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>11</th>\n",
              "      <td>run_id</td>\n",
              "      <td>2021-04-19T10:22:11.043843</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>"
            ],
            "text/plain": [
              "         property                                              value\n",
              "0    component_id                                            Trainer\n",
              "1   pipeline_root  /tmp/tfx-interactive-2021-04-19T10_22_06.38015...\n",
              "2     module_file                        /content/penguin_trainer.py\n",
              "3    checksum_md5                   bfcbe87349c87f86751e959786dde8f4\n",
              "4      train_args                           {\\n  \"num_steps\": 100\\n}\n",
              "5   custom_config                                               null\n",
              "6          run_fn                                               None\n",
              "7           state                                           complete\n",
              "8   pipeline_name             interactive-2021-04-19T10_22_06.380156\n",
              "9      trainer_fn                                               None\n",
              "10      eval_args                            {\\n  \"num_steps\": 50\\n}\n",
              "11         run_id                         2021-04-19T10:22:11.043843"
            ]
          },
          "metadata": {
            "tags": []
          },
          "execution_count": 30
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "CYzlTckHClxC"
      },
      "source": [
        "## Summary\n",
        "\n",
        "In this tutorial, you learned about how you can leverage MLMD to trace the lineage of your TFX pipeline components and resolve issues.\n",
        "\n",
        "To learn more about how to use MLMD, check out these additional resources:\n",
        "\n",
        "* [MLMD API documentation](https://www.tensorflow.org/tfx/ml_metadata/api_docs/python/mlmd)\n",
        "* [MLMD guide](https://www.tensorflow.org/tfx/guide/mlmd)"
      ]
    }
  ]
}
